package IO流;

import java.io.*;

/*
 * 实现文件复制拷贝操作
 * */
public class FileCopy缓冲区多字节 {
    public static void main(String[] args) throws IOException {
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("C:\\Users\\gdq\\OneDrive\\桌面\\File文件夹\\777.txt"));
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("C:\\Users\\gdq\\OneDrive\\桌面\\File文件夹\\copy2.txt"));
        int len;
        byte[] chars = new byte[1024];
        while ((len = bis.read(chars)) != -1) {
            bos.write(chars, 0, len);
        }
        bis.close();
        bos.close();
    }
}
